Avoid warnings with tooltips on toplevels
authorMatthias Clasen <mclasen@redhat.com>
Thu, 5 Aug 2010 04:12:41 +0000 (00:12 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 5 Aug 2010 04:12:41 +0000 (00:12 -0400)
This was reported for tooltips on statusicons in bug 625235, but
it was affecting regular toplevel windows as well.

gtk/gtktooltip.c

index 3a50fc05b806cc15e46d6a75e5a921b0f6ff7462..c75f251a8c3a77fe4d8c05d4e8f02a4b99b4fce8 100644 (file)
@@ -876,6 +876,8 @@ get_bounding_box (GtkWidget    *widget,
   gint x4, y4;
 
   window = gtk_widget_get_parent_window (widget);
+  if (window == NULL)
+    window = gtk_widget_get_window (widget);
 
   x = widget->allocation.x;
   y = widget->allocation.y;